package com.butterfly.hotkey.worker.framework.properties;

import com.butterfly.hotkey.core.model.AppCacheModel;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import java.util.List;

/**
 * worker的配置
 *
 * @author butterfly
 * @since 2024/10/19
 */
@Configuration
@ConfigurationProperties(prefix = "hotkey.worker")
public class WorkerProperties {

    /**
     * 最近热key上报缓存配置信息
     */
    private AppCacheModel cacheRecent;

    /**
     * netty的端口
     */
    private int nettyPort;

    /**
     * 所有Key白名单 TODO
     */
    private List<String> whiteKeys;

    /**
     * dashboard的地址信息
     */
    private String dashboardUrl;


    public AppCacheModel getCacheRecent() {
        return cacheRecent;
    }

    public void setCacheRecent(AppCacheModel cacheRecent) {
        this.cacheRecent = cacheRecent;
    }

    public int getNettyPort() {
        return nettyPort;
    }

    public void setNettyPort(int nettyPort) {
        this.nettyPort = nettyPort;
    }

    public List<String> getWhiteKeys() {
        return whiteKeys;
    }

    public void setWhiteKeys(List<String> whiteKeys) {
        this.whiteKeys = whiteKeys;
    }

    public String getDashboardUrl() {
        return dashboardUrl;
    }

    public void setDashboardUrl(String dashboardUrl) {
        this.dashboardUrl = dashboardUrl;
    }
}
